home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / yard.c < prev    next >
C/C++ Source or Header  |  2000-04-04  |  19KB  |  452 lines

  1. /****************************************************************************
  2. 10 Yard Fight Driver.
  3.  
  4. L Taylor
  5. J Clegg
  6.  
  7. Loosely based on the Kung Fu Master driver.
  8.  
  9. ****************************************************************************/
  10.  
  11. #include "driver.h"
  12. #include "sndhrdw/irem.h"
  13. #include "vidhrdw/generic.h"
  14.  
  15.  
  16. extern unsigned char *yard_scroll_x_low;
  17. extern unsigned char *yard_scroll_x_high;
  18. extern unsigned char *yard_scroll_y_low;
  19. extern unsigned char *yard_score_panel_disabled;
  20.  
  21. void yard_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  22. int yard_vh_start(void);
  23. void yard_vh_stop(void);
  24. WRITE_HANDLER( yard_flipscreen_w );
  25. WRITE_HANDLER( yard_scroll_panel_w );
  26. void yard_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  27.  
  28.  
  29.  
  30. READ_HANDLER( mpatrol_input_port_3_r );
  31.  
  32.  
  33.  
  34. static struct MemoryReadAddress readmem[] =
  35. {
  36.     { 0x0000, 0x5fff, MRA_ROM },
  37.     { 0x8000, 0x8fff, MRA_RAM },        /* Video and Color ram */
  38.     { 0xd000, 0xd000, input_port_0_r },            /* IN0 */
  39.     { 0xd001, 0xd001, input_port_1_r },            /* IN1 */
  40.     { 0xd002, 0xd002, input_port_2_r },            /* IN2 */
  41.     { 0xd003, 0xd003, mpatrol_input_port_3_r },    /* DSW1 */
  42.     { 0xd004, 0xd004, input_port_4_r },            /* DSW2 */
  43.     { 0xe000, 0xefff, MRA_RAM },
  44.     { -1 }    /* end of table */
  45. };
  46.  
  47. static struct MemoryWriteAddress writemem[] =
  48. {
  49.     { 0x8000, 0x8fff, videoram_w, &videoram, &videoram_size },
  50.     { 0x9000, 0x9fff, yard_scroll_panel_w },
  51.     { 0xc820, 0xc87f, MWA_RAM, &spriteram, &spriteram_size },
  52.     { 0xa000, 0xa000, MWA_RAM, &yard_scroll_x_low },
  53.     { 0xa200, 0xa200, MWA_RAM, &yard_scroll_x_high },
  54.     { 0xa400, 0xa400, MWA_RAM, &yard_scroll_y_low },
  55.     { 0xa800, 0xa800, MWA_RAM, &yard_score_panel_disabled },
  56.     { 0xd000, 0xd000, irem_sound_cmd_w },
  57.     { 0xd001, 0xd001, yard_flipscreen_w },    /* + coin counters */
  58.     { 0xe000, 0xefff, MWA_RAM },
  59.     { -1 }    /* end of table */
  60. };
  61.  
  62.  
  63.  
  64. INPUT_PORTS_START( yard )
  65.     PORT_START    /* IN0 */
  66.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
  67.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
  68.     /* coin input must be active for 19 frames to be consistently recognized */
  69.     PORT_BIT_IMPULSE( 0x04, IP_ACTIVE_LOW, IPT_COIN3, 19 )
  70.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
  71.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
  72.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  73.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  74.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  75.  
  76.     PORT_START    /* IN1 */
  77.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  78.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY )
  79.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY )
  80.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY )
  81.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  82.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
  83.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  84.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 )
  85.  
  86.     PORT_START    /* IN2 */
  87.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  88.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL )
  89.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL )
  90.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL )
  91.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )
  92.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  93.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  94.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  95.  
  96.     PORT_START    /* DSW1 */
  97.     PORT_DIPNAME( 0x01, 0x01, "SW1A" )
  98.     PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
  99.     PORT_DIPSETTING( 0x00, DEF_STR( On ) )
  100.     PORT_DIPNAME( 0x02, 0x02, "SW2A" )
  101.     PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
  102.     PORT_DIPSETTING( 0x00, DEF_STR( On ) )
  103.     PORT_DIPNAME( 0x0c, 0x0c, "Time Reduced" )
  104.     PORT_DIPSETTING( 0x0c, "Normal" )
  105.     PORT_DIPSETTING( 0x08, "x 1.3" )
  106.     PORT_DIPSETTING( 0x04, "x 1.5" )
  107.     PORT_DIPSETTING( 0x00, "x 1.8" )
  108.     PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )  /* Gets filled in based on the coin mode */
  109.  
  110.     PORT_START    /* DSW2 */
  111.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
  112.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  113.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  114.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) )
  115.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  116.     PORT_DIPSETTING(    0x02, DEF_STR( Cocktail ) )
  117. /* This activates a different coin mode. Look at the dip switch setting schematic */
  118.     PORT_DIPNAME( 0x04, 0x04, "Coin Mode" )
  119.     PORT_DIPSETTING(    0x04, "Mode 1" )
  120.     PORT_DIPSETTING(    0x00, "Mode 2" )
  121.     PORT_BITX(    0x08, 0x08, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Slow Motion", IP_KEY_NONE, IP_JOY_NONE )
  122.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  123.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  124.     /* In stop mode, press 2 to stop and 1 to restart */
  125.     PORT_BITX   ( 0x10, 0x10, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Stop Mode", IP_KEY_NONE, IP_JOY_NONE )
  126.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  127.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  128.     PORT_DIPNAME( 0x20, 0x20, "SW6B" )
  129.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  130.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  131.     PORT_BITX(    0x40, 0x40, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  132.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  133.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  134.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  135.  
  136.     /* Fake port to support the two different coin modes */
  137.     PORT_START
  138.     PORT_DIPNAME( 0x0f, 0x0f, "Coinage Mode 1" ) /* mapped on coin mode 1 */
  139.     PORT_DIPSETTING(    0x0a, DEF_STR( 6C_1C ) )
  140.     PORT_DIPSETTING(    0x0b, DEF_STR( 5C_1C ) )
  141.     PORT_DIPSETTING(    0x0c, DEF_STR( 4C_1C ) )
  142.     PORT_DIPSETTING(    0x0d, DEF_STR( 3C_1C ) )
  143.     PORT_DIPSETTING(    0x0e, DEF_STR( 2C_1C ) )
  144.     PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
  145.     PORT_DIPSETTING(    0x07, DEF_STR( 1C_2C ) )
  146.     PORT_DIPSETTING(    0x06, DEF_STR( 1C_3C ) )
  147.     PORT_DIPSETTING(    0x05, DEF_STR( 1C_4C ) )
  148.     PORT_DIPSETTING(    0x04, DEF_STR( 1C_5C ) )
  149.     PORT_DIPSETTING(    0x03, DEF_STR( 1C_6C ) )
  150.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  151.     /* settings 0x10, 0x20, 0x80, 0x90 all give 1 Coin/1 Credit */
  152.      PORT_DIPNAME( 0x30, 0x30, "Coin A  Mode 2" )   /* mapped on coin mode 2 */
  153.     PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
  154.     PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
  155.     PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
  156.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  157.     PORT_DIPNAME( 0xc0, 0xc0, "Coin B  Mode 2" )
  158.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) )
  159.     PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
  160.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_5C ) )
  161.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
  162. INPUT_PORTS_END
  163.  
  164. /* exactly the same as yard, only difference is the Allow Continue dip switch */
  165. /* Also, the Cabinet dip switch doesn't seem to work. */
  166. INPUT_PORTS_START( vsyard )
  167.     PORT_START    /* IN0 */
  168.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
  169.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
  170.     /* coin input must be active for 19 frames to be consistently recognized */
  171.     PORT_BIT_IMPULSE( 0x04, IP_ACTIVE_LOW, IPT_COIN3, 19 )
  172.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
  173.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
  174.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  175.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  176.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  177.  
  178.     PORT_START    /* IN1 */
  179.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  180.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY )
  181.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY )
  182.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY )
  183.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  184.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
  185.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  186.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 )
  187.  
  188.     PORT_START    /* IN2 */
  189.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  190.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL )
  191.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL )
  192.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL )
  193.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )
  194.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  195.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  196.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  197.  
  198.     PORT_START    /* DSW1 */
  199.     PORT_DIPNAME( 0x01, 0x00, "Continue (Vs. Mode Only)" )
  200.     PORT_DIPSETTING( 0x01, DEF_STR( No ) )
  201.     PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
  202.     PORT_DIPNAME( 0x02, 0x02, "SW2A" )
  203.     PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
  204.     PORT_DIPSETTING( 0x00, DEF_STR( On ) )
  205.     PORT_DIPNAME( 0x0c, 0x0c, "Time Reduced" )
  206.     PORT_DIPSETTING( 0x0c, "Normal" )
  207.     PORT_DIPSETTING( 0x08, "x 1.3" )
  208.     PORT_DIPSETTING( 0x04, "x 1.5" )
  209.     PORT_DIPSETTING( 0x00, "x 1.8" )
  210.     PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )  /* Gets filled in based on the coin mode */
  211.  
  212.     PORT_START    /* DSW2 */
  213.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
  214.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  215.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  216.     PORT_DIPNAME( 0x02, 0x00, "Cabinet?" )
  217.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  218.     PORT_DIPSETTING(    0x02, DEF_STR( Cocktail ) )
  219. /* This activates a different coin mode. Look at the dip switch setting schematic */
  220.     PORT_DIPNAME( 0x04, 0x04, "Coin Mode" )
  221.     PORT_DIPSETTING(    0x04, "Mode 1" )
  222.     PORT_DIPSETTING(    0x00, "Mode 2" )
  223.     PORT_BITX(    0x08, 0x08, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Slow Motion", IP_KEY_NONE, IP_JOY_NONE )
  224.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  225.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  226.     /* In stop mode, press 2 to stop and 1 to restart */
  227.     PORT_BITX   ( 0x10, 0x10, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Stop Mode", IP_KEY_NONE, IP_JOY_NONE )
  228.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  229.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  230.     PORT_DIPNAME( 0x20, 0x20, "SW6B" )
  231.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  232.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  233.     PORT_BITX(    0x40, 0x40, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  234.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  235.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  236.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  237.  
  238.     /* Fake port to support the two different coin modes */
  239.     PORT_START
  240.     PORT_DIPNAME( 0x0f, 0x0f, "Coinage Mode 1" ) /* mapped on coin mode 1 */
  241.     PORT_DIPSETTING(    0x0a, DEF_STR( 6C_1C ) )
  242.     PORT_DIPSETTING(    0x0b, DEF_STR( 5C_1C ) )
  243.     PORT_DIPSETTING(    0x0c, DEF_STR( 4C_1C ) )
  244.     PORT_DIPSETTING(    0x0d, DEF_STR( 3C_1C ) )
  245.     PORT_DIPSETTING(    0x0e, DEF_STR( 2C_1C ) )
  246.     PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
  247.     PORT_DIPSETTING(    0x07, DEF_STR( 1C_2C ) )
  248.     PORT_DIPSETTING(    0x06, DEF_STR( 1C_3C ) )
  249.     PORT_DIPSETTING(    0x05, DEF_STR( 1C_4C ) )
  250.     PORT_DIPSETTING(    0x04, DEF_STR( 1C_5C ) )
  251.     PORT_DIPSETTING(    0x03, DEF_STR( 1C_6C ) )
  252.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  253.     /* settings 0x10, 0x20, 0x80, 0x90 all give 1 Coin/1 Credit */
  254.      PORT_DIPNAME( 0x30, 0x30, "Coin A  Mode 2" )   /* mapped on coin mode 2 */
  255.     PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
  256.     PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
  257.     PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
  258.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  259.     PORT_DIPNAME( 0xc0, 0xc0, "Coin B  Mode 2" )
  260.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) )
  261.     PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
  262.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_5C ) )
  263.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
  264. INPUT_PORTS_END
  265.  
  266.  
  267.  
  268. static struct GfxLayout charlayout =
  269. {
  270.     8,8,    /* 8*8 characters */
  271.     1024,    /* 1024 characters */
  272.     3,    /* 3 bits per pixel */
  273.     { 2*1024*8*8, 1024*8*8, 0 },
  274.     { 0, 1, 2, 3, 4, 5, 6, 7 },
  275.     { 8*0, 8*1, 8*2, 8*3, 8*4, 8*5, 8*6, 8*7 },
  276.     8*8    /* every char takes 8 consecutive bytes */
  277. };
  278. static struct GfxLayout spritelayout =
  279. {
  280.     16,16,    /* 16*16 sprites */
  281.     512,    /* 256 sprites */
  282.     3,    /* 3 bits per pixel */
  283.     { 2*0x4000*8, 0x4000*8, 0 },
  284.     { 0, 1, 2, 3, 4, 5, 6, 7,
  285.             16*8+0, 16*8+1, 16*8+2, 16*8+3, 16*8+4, 16*8+5, 16*8+6, 16*8+7},
  286.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
  287.             8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
  288.     32*8    /* every sprite takes 32 consecutive bytes */
  289. };
  290.  
  291.  
  292. static struct GfxDecodeInfo gfxdecodeinfo[] =
  293. {
  294.     { REGION_GFX1, 0, &charlayout,       0, 32 },    /* use colors 0-255 */
  295.     { REGION_GFX2, 0, &spritelayout,  32*8, 32 },    /* use colors 256-271 with lookup table */
  296.     /* bitmapped radar uses colors 272-527 */
  297.     { -1 } /* end of array */
  298. };
  299.  
  300.  
  301.  
  302. static struct MachineDriver machine_driver_yard =
  303. {
  304.     /* basic machine hardware */
  305.     {
  306.         {
  307.             CPU_Z80,
  308.             4000000,    /* 4 Mhz (?) */
  309.             readmem,writemem,0,0,
  310.             interrupt,1
  311.         },
  312.         IREM_AUDIO_CPU
  313.     },
  314.     57, 1790,    /* accurate frequency, measured on a Moon Patrol board, is 56.75Hz. */
  315.                 /* the Lode Runner manual (similar but different hardware) */
  316.                 /* talks about 55Hz and 1790ms vblank duration. */
  317.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  318.     0,
  319.  
  320.     /* video hardware */
  321.     32*8, 32*8, { 0*8, 32*8-1, 1*8, 31*8-1 },
  322.     gfxdecodeinfo,
  323.     256+16+256, 32*8+32*8,
  324.     yard_vh_convert_color_prom,
  325.  
  326.     VIDEO_TYPE_RASTER,
  327.     0,
  328.     yard_vh_start,
  329.     yard_vh_stop,
  330.     yard_vh_screenrefresh,
  331.  
  332.     /* sound hardware */
  333.     0,0,0,0,
  334.     {
  335.         IREM_AUDIO
  336.     }
  337. };
  338.  
  339.  
  340. /***************************************************************************
  341.  
  342.   Game driver(s)
  343.  
  344. ***************************************************************************/
  345. ROM_START( yard )
  346.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  347.     ROM_LOAD( "yf-a-3p",      0x0000, 0x2000, 0x4586114f )
  348.     ROM_LOAD( "yf-a-3n",      0x2000, 0x2000, 0x947fa760 )
  349.     ROM_LOAD( "yf-a-3m",      0x4000, 0x2000, 0xd4975633 )
  350.  
  351.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  352.     ROM_LOAD( "yf-s-3b",      0x8000, 0x2000, 0x0392a60c )
  353.     ROM_LOAD( "yf-s-1b",      0xa000, 0x2000, 0x6588f41a )
  354.     ROM_LOAD( "yf-s-3a",      0xc000, 0x2000, 0xbd054e44 )
  355.     ROM_LOAD( "yf-s-1a",      0xe000, 0x2000, 0x2490d4c3 )
  356.  
  357.     ROM_REGION( 0x06000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  358.     ROM_LOAD( "yf-a-3e",      0x00000, 0x2000, 0x77e9e9cc )    /* chars */
  359.     ROM_LOAD( "yf-a-3d",      0x02000, 0x2000, 0x854d5ff4 )
  360.     ROM_LOAD( "yf-a-3c",      0x04000, 0x2000, 0x0cd8ffad )
  361.  
  362.     ROM_REGION( 0x0c000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  363.     ROM_LOAD( "yf-b-5b",      0x00000, 0x2000, 0x1299ae30 )    /* sprites */
  364.     ROM_LOAD( "yf-b-5c",      0x02000, 0x2000, 0x8708b888 )
  365.     ROM_LOAD( "yf-b-5f",      0x04000, 0x2000, 0xd9bb8ab8 )
  366.     ROM_LOAD( "yf-b-5e",      0x06000, 0x2000, 0x47077e8d )
  367.     ROM_LOAD( "yf-b-5j",      0x08000, 0x2000, 0x713ef31f )
  368.     ROM_LOAD( "yf-b-5k",      0x0a000, 0x2000, 0xf49651cc )
  369.  
  370.     ROM_REGION( 0x0520, REGION_PROMS )
  371.     ROM_LOAD( "yard.1c",      0x0000, 0x0100, 0x08fa5103 ) /* chars palette low 4 bits */
  372.     ROM_LOAD( "yard.1d",      0x0100, 0x0100, 0x7c04994c ) /* chars palette high 4 bits */
  373.     ROM_LOAD( "yard.1f",      0x0200, 0x0020, 0xb8554da5 ) /* sprites palette */
  374.     ROM_LOAD( "yard.2h",      0x0220, 0x0100, 0xe1cdfb06 ) /* sprites lookup table */
  375.     ROM_LOAD( "yard.2n",      0x0320, 0x0100, 0xcd85b646 ) /* radar palette low 4 bits */
  376.     ROM_LOAD( "yard.2m",      0x0420, 0x0100, 0x45384397 ) /* radar palette high 4 bits */
  377. ROM_END
  378.  
  379. ROM_START( vsyard )
  380.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  381.     ROM_LOAD( "a-3p",         0x0000, 0x2000, 0x1edac08f )
  382.     ROM_LOAD( "vyf-a-3m",     0x2000, 0x2000, 0x3b9330f8 )
  383.     ROM_LOAD( "a-3m",         0x4000, 0x2000, 0xcf783dad )
  384.  
  385.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  386.     ROM_LOAD( "yf-s-3b",      0x8000, 0x2000, 0x0392a60c )
  387.     ROM_LOAD( "yf-s-1b",      0xa000, 0x2000, 0x6588f41a )
  388.     ROM_LOAD( "yf-s-3a",      0xc000, 0x2000, 0xbd054e44 )
  389.     ROM_LOAD( "yf-s-1a",      0xe000, 0x2000, 0x2490d4c3 )
  390.  
  391.     ROM_REGION( 0x06000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  392.     ROM_LOAD( "vyf-a-3a",     0x00000, 0x2000, 0x354d7330 )    /* chars */
  393.     ROM_LOAD( "vyf-a-3c",     0x02000, 0x2000, 0xf48eedca )
  394.     ROM_LOAD( "vyf-a-3d",     0x04000, 0x2000, 0x7d1b4d93 )
  395.  
  396.     ROM_REGION( 0x0c000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  397.     ROM_LOAD( "yf-b-5b",      0x00000, 0x2000, 0x1299ae30 )    /* sprites */
  398.     ROM_LOAD( "yf-b-5c",      0x02000, 0x2000, 0x8708b888 )
  399.     ROM_LOAD( "yf-b-5f",      0x04000, 0x2000, 0xd9bb8ab8 )
  400.     ROM_LOAD( "yf-b-5e",      0x06000, 0x2000, 0x47077e8d )
  401.     ROM_LOAD( "yf-b-5j",      0x08000, 0x2000, 0x713ef31f )
  402.     ROM_LOAD( "yf-b-5k",      0x0a000, 0x2000, 0xf49651cc )
  403.  
  404.     ROM_REGION( 0x0520, REGION_PROMS )
  405.     ROM_LOAD( "yard.1c",      0x0000, 0x0100, 0x08fa5103 ) /* chars palette low 4 bits */
  406.     ROM_LOAD( "yard.1d",      0x0100, 0x0100, 0x7c04994c ) /* chars palette high 4 bits */
  407.     ROM_LOAD( "yard.1f",      0x0200, 0x0020, 0xb8554da5 ) /* sprites palette */
  408.     ROM_LOAD( "yard.2h",      0x0220, 0x0100, 0xe1cdfb06 ) /* sprites lookup table */
  409.     ROM_LOAD( "yard.2n",      0x0320, 0x0100, 0xcd85b646 ) /* radar palette low 4 bits */
  410.     ROM_LOAD( "yard.2m",      0x0420, 0x0100, 0x45384397 ) /* radar palette high 4 bits */
  411. ROM_END
  412.  
  413. ROM_START( vsyard2 )
  414.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  415.     ROM_LOAD( "vyf-a-3n",     0x0000, 0x2000, 0x418e01fc )
  416.     ROM_LOAD( "vyf-a-3m",     0x2000, 0x2000, 0x3b9330f8 )
  417.     ROM_LOAD( "vyf-a-3k",     0x4000, 0x2000, 0xa0ec15bb )
  418.  
  419.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for sound cpu */
  420.     ROM_LOAD( "yf-s-3b",      0x8000, 0x2000, 0x0392a60c )
  421.     ROM_LOAD( "yf-s-1b",      0xa000, 0x2000, 0x6588f41a )
  422.     ROM_LOAD( "yf-s-3a",      0xc000, 0x2000, 0xbd054e44 )
  423.     ROM_LOAD( "yf-s-1a",      0xe000, 0x2000, 0x2490d4c3 )
  424.  
  425.     ROM_REGION( 0x06000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  426.     ROM_LOAD( "vyf-a-3a",     0x00000, 0x2000, 0x354d7330 )    /* chars */
  427.     ROM_LOAD( "vyf-a-3c",     0x02000, 0x2000, 0xf48eedca )
  428.     ROM_LOAD( "vyf-a-3d",     0x04000, 0x2000, 0x7d1b4d93 )
  429.  
  430.     ROM_REGION( 0x0c000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  431.     ROM_LOAD( "yf-b-5b",      0x00000, 0x2000, 0x1299ae30 )    /* sprites */
  432.     ROM_LOAD( "yf-b-5c",      0x02000, 0x2000, 0x8708b888 )
  433.     ROM_LOAD( "yf-b-5f",      0x04000, 0x2000, 0xd9bb8ab8 )
  434.     ROM_LOAD( "yf-b-5e",      0x06000, 0x2000, 0x47077e8d )
  435.     ROM_LOAD( "yf-b-5j",      0x08000, 0x2000, 0x713ef31f )
  436.     ROM_LOAD( "yf-b-5k",      0x0a000, 0x2000, 0xf49651cc )
  437.  
  438.     ROM_REGION( 0x0520, REGION_PROMS )
  439.     ROM_LOAD( "yard.1c",      0x0000, 0x0100, 0x08fa5103 ) /* chars palette low 4 bits */
  440.     ROM_LOAD( "yard.1d",      0x0100, 0x0100, 0x7c04994c ) /* chars palette high 4 bits */
  441.     ROM_LOAD( "yard.1f",      0x0200, 0x0020, 0xb8554da5 ) /* sprites palette */
  442.     ROM_LOAD( "yard.2h",      0x0220, 0x0100, 0xe1cdfb06 ) /* sprites lookup table */
  443.     ROM_LOAD( "yard.2n",      0x0320, 0x0100, 0xcd85b646 ) /* radar palette low 4 bits */
  444.     ROM_LOAD( "yard.2m",      0x0420, 0x0100, 0x45384397 ) /* radar palette high 4 bits */
  445. ROM_END
  446.  
  447.  
  448.  
  449. GAME( 1983, yard,    0,    yard, yard,   0, ROT0, "Irem", "10 Yard Fight" )
  450. GAME( 1984, vsyard,  yard, yard, vsyard, 0, ROT0, "Irem", "10 Yard Fight (Vs. version 11/05/84)" )
  451. GAME( 1984, vsyard2, yard, yard, vsyard, 0, ROT0, "Irem", "10 Yard Fight (Vs. version, set 2)" )
  452.